File manager - Edit - /home/autoph/public_html/projects/ahg-prf-api/app/Notifications/EmailNotification.php
Back
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class EmailNotification extends Notification implements ShouldQueue { use Queueable; protected $message ; // protected $contentDtl; // protected $subject; /** * Create a new notification instance. */ // public function __construct($message,$contentDtl) public function __construct($message) { // $this->project= $project; // $this->contentDtl = $contentDtl; $this->message = $message; } /** * Get the notification's delivery channels. * * @return array<int, string> */ // public function via(object $notifiable): array //for object usermodel public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. */ // public function toMail(object $notifiable): MailMessage public function toMail($notifiable): MailMessage { return (new MailMessage) ->subject($this->message['subject']) ->markdown('email.custom-prf', [ 'greeting' => $this->message['greeting'], 'body' => $this->message['body'], 'actionLabel' => $this->message['actionLabel'], 'link' => $this->message['link'], 'footer' => $this->message['footer'], ]); // ->greeting($this->message['greeting']) // // ->from(env('MAIL_USERNAME'), 'AutohubAdmin@PRF') // ->from(config('mail.from.address'), config('mail.from.name')) // ->line($this->message['body']) // // ->line($this->contentDtl) // ->line($this->message['footer']) // ->action($this->message['actionLabel'], $this->message['link']) // ->salutation("Regards,\nAutohub Admin PRF"); // <- CUSTOM FOOTER HERE } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ // 'subject' => $this->subject,//add this param if you want to get frm $request->input // 'contentDtl' => $this->contentDtl, 'message' => $this->message, ]; } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.15 |
proxy
|
phpinfo
|
Settings